home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Mops 2.7 / Quick Edit ƒ / Stack Notation < prev   
Text File  |  1992-12-13  |  3KB  |  78 lines

  1. This is the stack notation key for the file Mops Glossary, and the 
  2. various Subject Sorted Glossary files which should accompany the Mops
  3. Glossary.
  4.  
  5. Considerable effort has been devoted towards providing a consistent and 
  6. logical stack notation.  In general, compile time stack effects are shown.  
  7. Runtime behavior, if different, is contained in the description.  
  8.  
  9. The stack picture will always refer to the parameter stack.  The return
  10. stack is not shown.  The stack picture will always contain two hyphens
  11. ( -- ) even when there is no stack effect.  A colon ( : ) appearing after the
  12. stack comment of some words indicates that the input stream must contain
  13. additional information, usually a name for a dictionary entry being created or
  14. the name of a word that has already been defined.  The input stream is the
  15. text being loaded either from a source file, typed at the console, or pasted
  16. from the clipboard.
  17.  
  18. All entities represent the contents of one 32-bit cell on the stack, even 
  19. though that entity may only require less than 32 bits.  For example, a 
  20. character c is in the range 0 through 256, only really needing 8 bits, but 
  21. a full 32 bit cell is consumed nonetheless.  
  22.  
  23. When more than one type of stack outcome is possible, the different outcomes
  24. are separated by a | (vertical bar).
  25.  
  26.  
  27.  
  28. addr    memory address
  29. len        length, usually length of text
  30.  
  31. c        a character, in the range 0 through 256
  32. w        a 16-bit number in the range -32,768 through +32,767
  33. n        32-bit signed number in the range +/- 2,147,483,647
  34. flt        a floating point number ( we hold pointers on the stack, actually)
  35.  
  36. b        boolean, -1 = true, 0 = false
  37. t        boolean true = -1
  38. f        boolean false = 0
  39. ?        flag for a conditional phrase, non-zero is "true"
  40.  
  41. idx        index, as when referring to an array member
  42.  
  43.  
  44. point    32-bit toolbox point (2 packed integers).
  45. wptr    window pointer.
  46.  
  47. fcb        address of a file control block
  48. str255    address of a Pascal-type counted string.  The first byte is the count,
  49.         the first char is at address+1.
  50.  
  51. obj        address of the beginning of an object's data, or pointer to object.
  52.         When the name of an object is executed, this is the address that is
  53.         returned.
  54.  
  55. class    address of a class, or pointer to class.
  56.  
  57.  
  58. 16-bit-value    The stack alignment is offset by 2 bytes to prepare for or
  59.                 return from a toolbox call.
  60.  
  61. DICTIONARY HEADERS
  62.  
  63. lfa        link field address.  This is the beginning of a header.  The link field
  64.         is a 32-bit hash value.
  65. nfa        name field address.  Begins at lfa+4, is variable length.
  66. hca        handler code address. handler code occupies 2-bytes, just after the nfa.
  67. cfa        code field address.
  68. dfa        data field address
  69.  
  70. selID    selector ID.  the value left by executing any name ending with :.  It
  71.         is assumed by the Mops compiler that all words ending with colon ( : )
  72.         are selectors, or method names.
  73.  
  74. INPUT STREAM
  75.  
  76. name        Name for a new entry in the dictionary.
  77. word        Name of a word currently in the dictionary.
  78. lit            a number